// body {
//   background-color: #fba;
//   display: flex; //弹性盒需要加前缀去适配
// }

// 清除默认样式
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

// 设置主窗口样式
body {
  font: bold 20px "Courier";
}
.main {
  width: 360px;
  height: 520px;
  background-color: #b7d4a8;
  margin: 100px auto;
  border: 10px solid black;
  border-radius: 48px;
  display: flex;
  flex-direction: column; //主轴方向
  align-items: center; //侧轴的对齐方式
  justify-content: space-around; //主轴的对齐方式

  #stage {
    position: relative;
    width: 300px;
    height: 350px;
    border: 2px solid black;
    #snake {
      & > div {
        position: absolute;
        width: 10px;
        height: 10px;
        background-color: #000;
        border: 1px solid #b7d4a8;
      }
    }
    // 设置食物
    #food {
      width: 10px;
      height: 10px;
      position: absolute;
      left: 40px;
      top: 100px;
      display: flex;
      flex-flow: row wrap;
      justify-content: space-between;
      align-content: space-between;

      & > div {
        width: 4px;
        height: 4px;
        background-color: #000;
        transform: rotate(45deg);
      }
    }
  }
  #score-panel {
    width: 300px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
  }
}
